#!/bin/bash
step=2   #the frequency of the camera run
for ((i=1; i<=60; (i=i+step) ))
do
# this is for the test and use the camera1
#sudo uvccapture -B120 -C43 -S30 -x1280 -y720 -d/dev/video1 -m -o/home/xiaohua/data/capture/$i.jpg
# this is for the website server and use the camera1
sudo uvccapture -B120 -C43 -S30 -x1280 -y720 -d/dev/video1 -m -o/var/www/html/data/picture/test1.jpg
  echo "the $i picture has been taken"
  sleep $step
done
exit 0
